package com.xcyy.clbzbh.service.imp;

import com.xcyy.clbzbh.entity.TokenInfo;
import com.xcyy.clbzbh.repository.TokenRepository;
import com.xcyy.clbzbh.service.TokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TokenServiceImp implements TokenService {
    @Autowired
    private TokenRepository tokenRepository;

    @Override
    public TokenInfo findByUsername(String username) {
        return tokenRepository.findByUsername(username);
    }

    @Override
    public void save(TokenInfo tokenInfo) {
        tokenRepository.save(tokenInfo);
    }
}
